<template>
<div class="app">
 <!--<Editor :modelValue="state" @update:modelValue="state=$event"></Editor> -->
<Editor v-model="state"></Editor> 
  
</div>
  
</template>

<script>
import { ref,provide } from 'vue'
import data from './data.json' // 描述页面是怎么渲染的
import Editor from './packages/editor'
import {registerConfig as config} from './utils/editor-config.jsx'
export default {
  components:{
    Editor,
  },
  setup(){
    const state = ref(data)
    provide('config', config)
    return {
      state
    }
  }
}
</script>

<style lang="scss">
.app {
  position: fixed;
  top: 20px;
  bottom: 20px;
  left: 20px;
  right: 20px;
}
</style>
